Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the way we determine if an embedded TBasket is jagged. #218

Merged

Conversation

jpivarski
Copy link
Member

No description provided.

@jpivarski
Copy link
Member Author

% # uproot-issue21.root (not jagged)
% python -c 'import uproot, skhep_testdata; print(uproot.open(skhep_testdata.data_path("uproot-issue21.root"))["nllscan/mH"].array())'
[124, 124, 124, 124, 124, 124, 125, 125, ... 125, 125, 126, 126, 126, 126, 126, 126]
% 
% # uproot-issue327.root (jagged)
% python -c 'import uproot, skhep_testdata; print(uproot.open(skhep_testdata.data_path("uproot-issue327.root"))["DstTree/fTracks.fCharge"].array())'
[[1, -1], [1, 1, -1, -1, 1, -1, -1, -1, -1, ... [-1, -1, 1, -1, 1], [1, -1, 1, 1, 1]]
% 
% # uproot-issue232.root (jagged)
% python -c 'import uproot, skhep_testdata; print(uproot.open(skhep_testdata.data_path("uproot-issue232.root"))["fTreeV0/V0s.fV0pt"].array())'
[[], [], [], [], [], [0.432], [], [1.17, ... [], [], [], [], [1.41, 1.46], [], []]
% python -c 'import uproot, skhep_testdata; print(uproot.open(skhep_testdata.data_path("uproot-issue232.root"))["fTreeV0/MCparticles.nbodies"].array())'
[[18], [135, 135, 135, 135, 135, 136, 135], ... [132, 132, 132], [243], [2, 2]]
% 
% # uproot-issue187.root (jagged)
% python -c 'import uproot, skhep_testdata; print(uproot.open(skhep_testdata.data_path("uproot-issue187.root"))["fTreeV0/V0s.fV0pt"].array())'
[[], [], [], [], [], [0.432], [], [1.17, ... [], [], [], [], [1.41, 1.46], [], []]
% python -c 'import uproot, skhep_testdata; print(uproot.open(skhep_testdata.data_path("uproot-issue187.root"))["fTreeV0/MCparticles.nbodies"].array())'
[[18], [135, 135, 135, 135, 135, 136, 135], ... [132, 132, 132], [192], [2, 2]]
% 
% # uproot-from-geant4.root (jagged)
% python -c 'import uproot, skhep_testdata; print(uproot.open(skhep_testdata.data_path("uproot-from-geant4.root"))["Details/numgood"].array())'
[224]
% python -c 'import uproot, skhep_testdata; print(uproot.open(skhep_testdata.data_path("uproot-from-geant4.root"))["TrackedRays/Event"].array())'
[2, 19, 21, 22, 26, 27, 35, 36, 37, ... 963, 983, 984, 985, 988, 990, 992, 993, 997]
% python -c 'import uproot, skhep_testdata; print(uproot.open(skhep_testdata.data_path("uproot-from-geant4.root"))["TrackedRays/phi"].array())'
[1.81, 3.78, 6.25, 4.76, 2, 4.28, 2.5, ... 2.45, 0.346, 2.42, 3.77, 2.24, 4.31, 5.13]
>>> uproot.open("uproot-issue-208.root")["truth/truelepton_dir"].array(library="np")
array([[ 0.06063091, -0.48152107,  0.8743349 ],
       [-0.05262217,  0.45292157,  0.8899961 ],
       [-0.33558974, -0.09119339,  0.93758374],
       ...,
       [ 0.3563597 ,  0.4576636 ,  0.814587  ],
       [ 0.01233674,  0.03180967,  0.99941784],
       [ 0.41140354,  0.4344518 ,  0.80124825]], dtype=float32)

@jpivarski jpivarski merged commit 2aef482 into main Dec 5, 2020
@jpivarski jpivarski deleted the jpivarski/fix-recovered-basket-jaggedness-determination branch December 5, 2020 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DeserializationError when attempting to convert a ROOT vector to an array
1 participant